<%@ page language="java" contentType="text/html; charset=UTF-8"
	isELIgnored="false" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<%@ taglib uri="/mytag" prefix="yjd"%>
<script	src="${requestScope.FPWEB.staticRootPath }/Js/Plugins/Echarts/echarts.min.js"></script>

<div class="J_Chart_Panel">
		<div class="h_a1" style="clear: both;">
			<span class="title">预计到期金额</span>
			<div class="yjd-tip">
				<div style="width:500px;">
			预计到期金额： 在指定的时间段，借款项目状态变为“还款完成”的本金金额之和（按照最后一期应还款日期进行计算；借款项目对应的本金在该项目的最后一期应还款日期
			 （若历史数据中，本金的实际还款日期早于最后一期应还款日期，在实际还款日期把本金计入预计到期金额）计入新增预计到期金额）
				</div>
			</div>
		</div>
		<form method="post" id="sumary1" autocomplete="off" action="${requestScope.FPWEB.rootPath }/borrow/getExpectPrice${requestScope.FPWEB.urlStuff}">
			<div class="search_type cc">
				<label>起始时间：</label> <input type="input"  name="start" 
					class="input length_1 mr10 J_date"  min="2013-12-1" value="${t1 }" max="2020-12-31">
				<label>截止时间：</label> <input type="input"  name="end"  
					class="input length_1 mr10 J_date"  min="2013-12-1" value="${t7 }" max="2020-12-31">
				<label>存管用户：</label> <select name="depo_type" class="mr10">
				<option value="" selected="selected">不限</option>
				<option value="1" >是</option>
				<option value="0" >否</option>

			</select>
				<label>门店用户：</label> <select name="dz_type" class="mr10">
				<option value="" selected="selected">不限</option>
				<option value="1" >是</option>
				<option value="0">否</option>
			</select>
				<button id="search3" type="button" class="btn length_1">搜索</button>
			</div>
		</form>
		<div id="cbox">
		<div id="c3" class="count cc" >
			<div class="c-box" field="register_account">
				<div class="c-box-head">预计到期金额（元）</div>
				<div class="c-box-con">
					<span name="number" class="number">0</span>  <span>元</span>
				</div>
			</div>
	  </div>
	  </div>
	  </div>
	<script>
		var form3=$("#sumary1");
		$("#search3").click(function(){
			addCompareData3();
		});
		function addCompareData3() {
			var d=form3.serializeArray();
			var cbox=$("#c3");
			var boxes=cbox.find(".c-box");
			boxes.each(function(index,e){
				var val=$(this).find('span[name=number]');
				val.text("Loading...");
			});
			$.ajax({
				type: "post",
				url: form3.attr("action"),
				data :d,
				error:function(request){
					alert("连接失败！");
				},
				success:function(data){
					if (data.state == 1) {
						boxes.each(function(index,e){
							var val=$(this).find('span[name=number]');
							val.text(data.data.summaryVals[index]);
						});
					}
				}
			});
		}
		addCompareData3() ;
		
	</script>
